package com.ncsc.lmis.model;
// Generated Feb 25, 2014 11:44:39 PM by Hibernate Tools 3.4.0.CR1


import java.util.Date;
import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.JoinColumns;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * SaleLoanPaymentReceiptCancel generated by hbm2java
 */
@Entity
@Table(name="sale_loan_payment_receipt_cancel"
    ,catalog="lmis"
)
public class SaleLoanPaymentReceiptCancel  implements java.io.Serializable {


     private SaleLoanPaymentReceiptCancelId id;
     private SaleLoanPayment saleLoanPayment;
     private Short oldReceiptByEmpNo;
     private String newReceiptCode;
     private String cancelMemo;
     private Date cancelDtm;
     private Short cancelByEmpNo;

    public SaleLoanPaymentReceiptCancel() {
    }

	
    public SaleLoanPaymentReceiptCancel(SaleLoanPaymentReceiptCancelId id, SaleLoanPayment saleLoanPayment) {
        this.id = id;
        this.saleLoanPayment = saleLoanPayment;
    }
    public SaleLoanPaymentReceiptCancel(SaleLoanPaymentReceiptCancelId id, SaleLoanPayment saleLoanPayment, Short oldReceiptByEmpNo, String newReceiptCode, String cancelMemo, Date cancelDtm, Short cancelByEmpNo) {
       this.id = id;
       this.saleLoanPayment = saleLoanPayment;
       this.oldReceiptByEmpNo = oldReceiptByEmpNo;
       this.newReceiptCode = newReceiptCode;
       this.cancelMemo = cancelMemo;
       this.cancelDtm = cancelDtm;
       this.cancelByEmpNo = cancelByEmpNo;
    }
   
     @EmbeddedId

    
    @AttributeOverrides( {
        @AttributeOverride(name="contractRecNo", column=@Column(name="CONTRACT_REC_NO", nullable=false) ), 
        @AttributeOverride(name="paymentTypeNo", column=@Column(name="PAYMENT_TYPE_NO", nullable=false) ), 
        @AttributeOverride(name="termNo", column=@Column(name="TERM_NO", nullable=false) ), 
        @AttributeOverride(name="termSubNo", column=@Column(name="TERM_SUB_NO", nullable=false) ), 
        @AttributeOverride(name="oldReceiptCode", column=@Column(name="OLD_RECEIPT_CODE", nullable=false, length=50) ) } )
    public SaleLoanPaymentReceiptCancelId getId() {
        return this.id;
    }
    
    public void setId(SaleLoanPaymentReceiptCancelId id) {
        this.id = id;
    }

@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumns( { 
        @JoinColumn(name="CONTRACT_REC_NO", referencedColumnName="CONTRACT_REC_NO", nullable=false, insertable=false, updatable=false), 
        @JoinColumn(name="PAYMENT_TYPE_NO", referencedColumnName="PAYMENT_TYPE_NO", nullable=false, insertable=false, updatable=false), 
        @JoinColumn(name="TERM_NO", referencedColumnName="TERM_NO", nullable=false, insertable=false, updatable=false), 
        @JoinColumn(name="TERM_SUB_NO", referencedColumnName="TERM_SUB_NO", nullable=false, insertable=false, updatable=false) } )
    public SaleLoanPayment getSaleLoanPayment() {
        return this.saleLoanPayment;
    }
    
    public void setSaleLoanPayment(SaleLoanPayment saleLoanPayment) {
        this.saleLoanPayment = saleLoanPayment;
    }

    
    @Column(name="OLD_RECEIPT_BY_EMP_NO")
    public Short getOldReceiptByEmpNo() {
        return this.oldReceiptByEmpNo;
    }
    
    public void setOldReceiptByEmpNo(Short oldReceiptByEmpNo) {
        this.oldReceiptByEmpNo = oldReceiptByEmpNo;
    }

    
    @Column(name="NEW_RECEIPT_CODE", length=50)
    public String getNewReceiptCode() {
        return this.newReceiptCode;
    }
    
    public void setNewReceiptCode(String newReceiptCode) {
        this.newReceiptCode = newReceiptCode;
    }

    
    @Column(name="CANCEL_MEMO", length=500)
    public String getCancelMemo() {
        return this.cancelMemo;
    }
    
    public void setCancelMemo(String cancelMemo) {
        this.cancelMemo = cancelMemo;
    }

    @Temporal(TemporalType.TIMESTAMP)
    @Column(name="CANCEL_DTM", length=19)
    public Date getCancelDtm() {
        return this.cancelDtm;
    }
    
    public void setCancelDtm(Date cancelDtm) {
        this.cancelDtm = cancelDtm;
    }

    
    @Column(name="CANCEL_BY_EMP_NO")
    public Short getCancelByEmpNo() {
        return this.cancelByEmpNo;
    }
    
    public void setCancelByEmpNo(Short cancelByEmpNo) {
        this.cancelByEmpNo = cancelByEmpNo;
    }




}


